<script setup lang="ts">
// import VueUeditorWrap from "vue-ueditor-wrap";

const props = defineProps({
  modelValue: {
    type: String,
    default: ''
  },
})
const emit = defineEmits(['update:modelValue'])

const value = computed({
  get() {
    return props.modelValue
  },
  set(value) {
    emit('update:modelValue', value)
  }
})
// const msg = ref("<h2>Hello World!</h2>");
const editorConfig = {
  // 访问 UEditor 静态资源的根路径，可参考 https://hc199421.gitee.io/vue-ueditor-wrap/#/faq
  UEDITOR_HOME_URL: "/UEditor/",
  // 服务端接口（这个地址是我为了方便各位体验文件上传功能搭建的临时接口，请勿在生产环境使用！！！）
  serverUrl: 'https://ueditor.zhenghaochuan.com/cos'
}

</script>

<template>
  <div class="uedit">

    <vue-ueditor-wrap v-model="value" :config="editorConfig" editor-id="editor-demo-01"></vue-ueditor-wrap>

  </div>
</template>


<style lang="scss">
.uedit {
  width: 100%;
  height: 100%;

  .edui-default {
    position: relative;
    z-index: 2;

    .edui-editor {
      width: 100% !important;
      min-height: 400px !important;
    }
  }
}



#edui_fixedlayer {
  z-index: 2100 !important;
}
</style>